
***********************************************************************************************************************
**** Table A15. No Heterogeneous Treatment Effects with Respect to Distance to Post Office ****************************
***********************************************************************************************************************

use "$data/Non_payment_dataset_ready.dta" , clear

log using "$filepath/output_logs/table A15", replace


probit paidcount itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* if t==14, vce(cluster customer)

probit paidcount itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* if t==14, vce(cluster customer)
margins, dydx(itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance) post

reg lnpayment itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy* if t==14, vce(cluster customer)
 
preserve
keep if t==14
capture program drop Ey_boot
program define Ey_boot, eclass
twopm payment itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance premeaninvoicew presumpaymentratiow preage_of_accountw preclosingbalancew prepaidcounttotal interviewerdummy* datedummy*, firstpart(probit) secondpart(regress, log) vce(cluster customer)
margins, dydx(itt2 itt3 itt2asinhdistancedistance itt3asinhdistancedistance asinhdistance) predict(duan) nose post
end
bootstrap _b, seed(3125) reps(1000): Ey_boot
estimates store highlow
restore

log close
